﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace FourSquareNETCFLibrary
{
    public class stats
    {
        private int _checkins;
        private mayor _mayor;
        
        public stats(XmlNode Xml)
        {
            XmlNodeList xnl = Xml.ChildNodes;

            foreach (XmlNode xn in xnl)
            {
                switch (xn.Name)
                {
                    case "checkins":
                        this._checkins = Convert.ToInt32(xn.InnerText);
                        break;
                    case "mayor":
                        this._mayor = new mayor(xn);
                        break;
                }
            }
        }

        public int CheckIns
        {
            get
            {
                return this._checkins;
            }
        }

        public mayor Mayor
        {
            get
            {
                return this._mayor;
            }
        }
    }
}
